<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['设备安装管理','设备退回记录']" icon="fa fa-wrench" class="col-xs-12 col-sm-7 col-md-7 col-lg-4">
		</sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>设备退回记录</h2>
				</header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module">
									<span class="module_text">公司名称</span>
									<sa-company-tree companyTreeId="companyTree" (companySelected)="companySelected($event)">
									</sa-company-tree>
								</div>
								<!-- <div class="top_module top_module_box">
									<span class="module_text">车牌号码</span>
									<div class="s_hover_box">
										<select   class="select2"  id="carNumberSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='del_carNumber()'>x</div>
									</div>
								</div> -->
								<!-- <div class="top_module top_module_box">
									<span class="module_text">操作人</span>
									<input type="text" class="module_inp top_module_select" [(ngModel)]="userName" placeholder="操作人"/>
                                </div> -->

								<div class="selectDate top_module">
									<table-select-date [notInit]='true' [specifyTime]='specifyTime' [notInit]="true"
										(outerTime)="dateSelect($event)"></table-select-date>
								</div>
								<div class="top_module">
									<span class="module_text">选择天数</span>
									<select name="" id="" class="module_inp" [(ngModel)]="dateNumber" (change)='selectDate()'>
										<option value="">无</option>
										<option value="10">近10天</option>
										<option value="20">近20天</option>
										<option value="30">近30天[默认]</option>
										<option value="60">近60天</option>
										<option value="90">近90天</option>
										<option value="100">近100天</option>
									</select>
								</div>
								<!-- <sa-company-tree-car  companyTreeId="companyTree" wrapId="content" [isShowCarSort]="false"  [isShowCarNum]="true"  (companySelected)="companySelected($event)"></sa-company-tree-car> -->
								<button type="button" class="btn btn-primary" (click)="tableSearch()">查询</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="searchKey" (change)="tableSearch()" class="search-input"
									placeholder="发件人 收件人 产品编号">
								<span class="top-search-box">
									<button class="top-search-btn" type="button" (click)="tableSearch()"> <i
											class="fa fa-search"></i></button>
								</span>
							</div>
						</div>
						<div class="table_scroll">
							<table
								class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>厂区</th>
										<th>寄件人</th>
										<!-- <th>收件人</th>
										<th>收件人电话</th> -->
										<th>主机数量</th>
										<th>天线数量</th>
										<th>线材数量</th>
										<th>产品编码</th>
										<th>快递单位</th>
										<th>快递单号</th>
										<th>图片</th>
										<th>记录时间</th>
										<th>其他</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" [ngClass]='{selected: activeSelected === row.id }'>
										<td>{{row.companyName}}</td>
										<td>{{row.sender}}</td>
										<!-- <td>{{row.addressee}}</td>
										<td>{{row.addresseePhone}}</td> -->
										<td>{{row.hostNum}}</td>
										<td>{{row.aerialNum}}</td>
										<td>{{row.wireNum}}</td>
										<td>{{row.productNo}}</td>
										<td>{{row.expressDeliveryUnit}}</td>
										<td>
											<span>{{row.expressDeliveryNumber}}</span>&nbsp;&nbsp;
											<button type="button" *ngIf="row.expressDeliveryNumber"
												(click)="showExpress(row,expressModal)">>>查看物流</button>
										</td>
										<td>
											<button *ngIf="row.picUrl!=''" type="button" (click)="showImg2(row,imgModal2)">查看</button>
										</td>
										<td>{{row.createTime}}</td>
										<td>{{row.other}}</td>
										<td>
											<button type="button" (click)="rowDelete(row)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCounts" [rows]="pageSize" [currentPage]="curPage - 1"
								(onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i
									class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>
<!-- 图片查看   弹窗-->
<section bsModal #imgModal2="bs-modal" class="modal fade" tabindex="-1" role="dialog"
	aria-labelledby="myLargeModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content" style="width: 570px;">
			<div class="modal-header">
				<button type="button" class="close" (click)="closeImgModal2(imgModal2)" aria-label="Close"><span
						aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">损坏设备照片</h4>
			</div>
			<div class="modal-body">
				<div class="imagesInfo2">
					<div class="imgShow" *ngFor="let item of imgLocalList" (click)="bigimg('Modal2',item)">
						<img [src]="item" alt="损坏设备照片" style="cursor: pointer;" />
					</div>
				</div>
			</div>
		</div>
	</div>
</section>
<!-- 图片查看 弹窗end-->
<!-- 物流详情的弹框 -->
<section bsModal #expressModal="bs-modal" id="expressModal" class="modal fade" role="dialog"
	aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" aria-label="Close" (click)="expressModalClose(expressModal)"><span
						aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">物流详情</h4>
			</div>
			<div class="modal-body" style="padding-top: 15px;">
				<!-- 展示物流的 -->
				<h3 class="expressH3">快递公司：<span>{{expressCompany}}</span></h3>
				<h3 class="expressH3">快递单号：<span>{{expressNumber}}</span></h3>
				<div class="fengeline"></div>
				<h3 class="expressH3">物流进程：</h3>
				<ul class="expressWrap" *ngIf="expressList.length>0">
					<li class="expressLi" *ngFor="let item of expressList; let i = index">
						<div class="processIcon">
							<!-- 完成 -->
							<img *ngIf="item.status=='签收'" src="assets/img/express/wancheng.png" alt="已签收">
							<!-- 运输中最后一个 -->
							<img *ngIf="item.status!='签收'&&i==0&&i!=(expressList.length-1)" src="assets/img/express/yunshuzhong.png"
								alt="运输中">
							<!-- 运输中箭头 -->
							<img *ngIf="item.status!='签收'&&i!=0&&i!=(expressList.length-1)"
								style="height: 80%;width: 80%;position: absolute;left: 2px;" src="assets/img/express/top.png" alt="运输中">
							<!-- 开始的图标 -->
							<img *ngIf="item.status!='签收'&&i!=0&&i==(expressList.length-1)"
								style="height: 80%;width: 80%;position: absolute;top: 7px;left: 2px;" src="assets/img/express/yuan.png"
								alt="运输中">
						</div>
						<div class="processline" *ngIf="i!=(expressList.length-1)"></div>
						<div>
							<div class="contextTitle" *ngIf="i==0&&item.status=='签收'">已签收</div>
							<div class="contextTitle" *ngIf="i==0&&item.status=='在途'">运输中</div>
							<div class="contextTitle" *ngIf="i==0&&item.status=='派件'">派件中</div>
							{{item.context}}
						</div>
						<div>
							{{item.ftime}}
						</div>
					</li>
				</ul>
				<div *ngIf="expressList.length==0" style="color: #999999;text-align: center;">
					暂无物流数据
				</div>
			</div>
		</div>
	</div>
</section>
<!--  物流详情的弹框 end-->